import * as assert from 'assert';

let doassert = async()=>{
    try{
        /** 断言承诺不会被拒绝 */
        let result = await assert.doesNotReject(async()=>{throw new Error("我就是要抛出错误！")},"函数返回Promise被拒绝！");
    }catch(err){
        console.log(err);
    }
}

doassert();

